﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace QuanLyCayXanh.Models
{
    [Table("Address")]
    public class Address
    {
                public Address()
        {
            //this.Trees = new HashSet<Tree>();
        }

        public int Id { get; set; }
        [Required(ErrorMessage="{0} không được bỏ trống!")]
        [Display(Name="Địa chỉ")]
        public string Name { get; set; }
        [ForeignKey("Street")]
        [Display(Name="Tên Đường")]
        public Nullable<int> Street_Id { get; set; }
        [ForeignKey("Ward")]
        [Display(Name="Tên Phường")]
        public Nullable<int> Ward_Id { get; set; }
        public Nullable<int> Count_Click { get; set; }

        public virtual Street Street { get; set; }
        public virtual Ward Ward { get; set; }
       // public virtual ICollection<Tree> Trees { get; set; }
    }
}